<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ include file="../../common/jsp/taglibs.jsp"%>
<!-- 
    Copyright (C)  2011  chen wei hua.
    Permission is granted to copy, distribute and/or modify this document
    under the terms of the GNU Free Documentation License, Version 2.0
    or any later version published by the Free Software Foundation;
    with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts.
    A copy of the license is included in the section entitled "GNU Free Documentation License".
 -->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>退货物料一览</title>
<%@ include file="../../common/jsp/config.jsp"%>
<script type="text/javascript">
function saveSubmit() {
	var checkboxs = $(":checkbox[checked]");
	if (checkboxs.length == 0) {
		alert("至少选择一个物料，生成退货单");
		return false;
	}
	$("#newBacksupplierMaterialsOrder").submit();
	return false;
}
</script>
</head>

<body>
     <div class="subnav" align="left">
        <table width="100%" border="0" cellspacing="0" cellpadding="0">
		  <tr>
			<td width="100%" align="left" height="31">&nbsp;<img src="common/images/title-pk.gif" border="0"  align="absmiddle"/>&nbsp;<span class="subnavtxt1">采购管理</span>
			&nbsp;<img src="common/images/leftico2.gif" border="0"  align="absmiddle"/>&nbsp;<span class="subnavtxt2">退货物料一览</span></td>
		  </tr>
		</table>
      </div>
      <s:form action="newBacksupplierMaterialsOrder">
      <div class="ksglxx2">
       <table width="715px" cellpadding="0" cellspacing="1" border="0" class="ksglxx2a">
        <tr class="ksglxx2bg">
          <th width="20px" ></th>
          <th width="50px" >大分类</th>
          <th width="60px" >中分类</th>
          <th width="95px" >名称</th>
          <th width="180px" >型号</th>
          <th width="180px" >其他</th>
		  <th width="50px">单位</th>
		  <th width="80px">不良品数量</th>
		</tr>
		<s:iterator value="materials" id="detail" status="st">
          <s:if test="#st.Odd">
            <tr class="odd">
          </s:if>
          <s:else>
            <tr class="even">
          </s:else>
              <td><s:checkbox name="requestIds" fieldValue="%{#detail.materialsId}" /></td>
              <td><s:property value="#detail.materialsRootCategory" /></td>
              <td><s:property value="#detail.materialsCategory" /></td>
              <td><s:property value="#detail.materialsName" /></td>
              <td><s:property value="#detail.materialsType" /></td>
              <td><s:property value="#detail.materialsSku" /></td>
              <td><s:property value="#detail.unit" /></td>
              <td><s:property value="#detail.number" /></td>
            </tr>
		</s:iterator>
       </table>
     </div>
     <div class="clear"></div>
	 <div class="main_1">
		<table width="98%" border="0" cellpadding="5" cellspacing="0" class="gr-text1">
		   <tr>
			 <td width="45%" align="right">
				<input type="button" value="生成退货单" class="input1" onclick="saveSubmit()" />
			 </td>
			 <td></td>
		   </tr>
	    </table>
	 </div>
    </s:form>
</body>
</html>
